import onnx

model = onnx.load("D:/CodeCNN/yolov8-study/runs/detect/train31/weights/best31n_int8_3.onnx")
q_nodes = [n for n in model.graph.node if n.op_type == "QuantizeLinear"]
dq_nodes = [n for n in model.graph.node if n.op_type == "DequantizeLinear"]

print(f"QuantizeLinear 节点数: {len(q_nodes)}")
print(f"DequantizeLinear 节点数: {len(dq_nodes)}")